<ui:composition template="../layout/layout.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.prime.com.tr/ui">

	<ui:define name="title">
		<h:outputText value="Usuário" />
	</ui:define>

	<ui:define name="content">
		<div id="path">
			<h1>Minha Conta</h1>
			<hr />
		</div>
		<br />
		<h:form prependId="false">
			<h:outputLabel value="Administrador:" for="admin" />
			<h:outputText value="Sim" rendered="#{minhaContaMBean.usuario.admin}" />
			<h:outputText value="Não" rendered="#{!minhaContaMBean.usuario.admin}" />
			<br />

			<h:outputLabel value="Nome:" for="nome" />
			<h:outputText value="#{minhaContaMBean.usuario.nome}" />
			<br />

			<h:outputLabel value="CPF:" for="cpf" />
			<h:outputText value="#{minhaContaMBean.usuario.cpf}" />
			<br />

			<h:outputLabel value="Categoria:" for="categoria" />
			<h:outputText value="#{minhaContaMBean.usuario.categoria}" />
			<br />

			<h:outputLabel value="Email:" for="email" />
			<h:outputText value="#{minhaContaMBean.usuario.email}" />
			<br />

			<fieldset>
				<legend>Alterar Senha</legend>

				<h:outputLabel value="Senha Antiga:" for="senha" />
				<h:inputSecret id="senha" class="s300"
					value="#{usuarioMBean.usuario.senha}" required="true"
					requiredMessage="* O campo [Senha] é obrigatório!" />
				<h:message for="senha" showSummary="true" showDetail="false"
					class="error" />
				<br />

				<h:outputLabel value="Nova Senha :" for="senhanova" />
				<h:inputSecret id="senhanova" class="s300"
					value="#{usuarioMBean.usuario.senha}" required="true"
					requiredMessage="* O campo [Nova Senha] é obrigatório!" />
				<h:message for="senha" showSummary="true" showDetail="false"
					class="error" />
				<br />
				
				<h:outputLabel value="Confirmar Senha:" for="cNovaSenha" />
				<h:inputSecret id="cNovaSenha" class="s300"
					value="#{usuarioMBean.usuario.senha}" required="true"
					requiredMessage="* O campo [Confirmar Senha] é obrigatório!" />
				<h:message for="senha" showSummary="true" showDetail="false"
					class="error" />
				<br />
				
				<h:commandButton class="button check" value="Salvar"/>
			</fieldset>
		</h:form>
	</ui:define>
</ui:composition>